n=1
while :
do
    log=/root/log/io-$n.log
    date >> $log
    iostat | grep -E "avg|[0-9]|De|sd|dm" >> $log
    echo >> $log
    size=`ls -l $log | awk '{print $5}'`

    if [ $size -gt 100000000 ];then    
        n=`expr $n + 1`
    fi
    sleep 3
done
